home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gekkan Dennou Club 145
/
Gekkan Dennou Club - 2000.6 Vol. 145 (Japan).7z
/
Gekkan Dennou Club - 2000.6 Vol. 145 (Japan) (Track 1).bin
/
games
/
spassion
/
source.lzh
/
SOURCE
/
ENTRY.C
< prev
next >
Wrap
Text File
|
2000-03-25
|
2KB
|
121 lines
/*
#include <stdio.h>
#include <stdlib.h>
#include <iocslib.h>
void key_wait( void );
*/
#include <XSP2lib.H>
#include "SPASSION.H"
#include "ENEMY.H"
#include "ENTRY.H"
#include "SOUND.H"
#define ENTRY_MUSIC 250
#define ENTRY_MUSIC_FADEOUT 251
#define ENTRY_NON 253
#define ENTRY_START 254
#define ENTRY_END 255
void InitStage( void );
void EndStage( void );
enum {
WAIT_NON = 0, WAIT_NOW, WAIT_END
};
void Init0Entry( void )
{
}
/* ゲーム開始時に呼ばれる */
void InitEntry( void )
{
entry_counter = 0;
entry_timer = 0;
entry_counter_stop = 0;
}
void MoveEntry( void )
{
void VdispRoutine( void );
if (entry_counter_stop)
return; /* エントリーカウンター停止中 */
if (--entry_timer > 0)
return; /* まだ敵は出現しない */
#ifdef DEBUG
{
/* char temp_str[64];
sprintf (temp_str, "ENTRY %03d", entry_counter);
TxfontCursor (22, 5);
TxfontPuts (temp_str);
*/ }
#endif
do{
short type = stage_data[stage][entry_counter].type;
entry_timer = stage_data[stage][entry_counter].timer;
switch (type) {
case ENTRY_START:
/* GvramInit ();*/
InitStage();
/* bg_contrast_num = 33;*/
entry_counter++;
break;
case ENTRY_END:
/* ここで停止されたエントリーカウンターは otoko.c VdispRoutine() で */
/* フェードアウトが終わると再開される */
entry_counter_stop = !0; /* エントリーカウンター停止 */
/* bg_contrast_control = BG_FADEOUT;*/
game_state=END_STAGE;
xsp_vsyncint_on(&VdispRoutine);
/* bg_contrast_num = 33;*/
if (stage < STAGES - 1) {
entry_counter = 0;
entry_timer = 1;
} else {
entry_counter++;
entry_timer = 1;
}
break;
case ENTRY_NON:
entry_counter++;
break;
case ENTRY_MUSIC:
if( game_state==IN_GAME )
PlayBGM(stage_data[stage][entry_counter].arg);
entry_counter++;
break;
case ENTRY_MUSIC_FADEOUT:
FadeOut(stage_data[stage][entry_counter].arg);
entry_counter++;
break;
default:
if( level >= stage_data[stage][entry_counter].control ){
MakeEnemy(type,
stage_data[stage][entry_counter].x, stage_data[stage][entry_counter].y,
stage_data[stage][entry_counter].arg, (struct ENEMY *) 0);
}
entry_counter++;
break;
}
}while(entry_timer == 0);
}
void TiniEntry( void )
{
}